import request from '@/utils/request/req'

export function queryTaskList() {
  return request({
    url: '/seed/listTask',
    method: 'get',
  })
}

export function queryHC28List() {
  return request({
    url: '/queryDirectory',
    method: 'get',
  })
}

export function getComfyServer(endpoint: string) {
  return request({
    url: '/getComfyServer',
    method: 'get',
    params: {
      endpoint,
    },
  })
}

export function getComfyWs() {
  return request({
    url: '/getComfyWs',
    method: 'get',
  })
}

export function queryStatus(taskId: any) {
  return request({
    url: `/seed/status/${taskId}`,
    method: 'get',
  })
}

export function queryResult(taskId: any) {
  return request({
    url: '/seed/result',
    method: 'get',
    params: {
      taskId,
    },
  })
}

export function submitSeed(params: any) {
  return request({
    url: '/seed/blend',
    method: 'post',
    data: params,
  })
}

export function submitComfyUI(params: any) {
  return request({
    url: '/submitTask',
    method: 'post',
    data: params,
  })
}
